﻿
namespace OZDoo.Core.Caching
{
    /// <summary>
    /// 伪装缓存类,本类只模拟实现缓存接口,并不提供任何实际操作
    /// </summary>
    class FakeCache : ICache
    {
        /// <summary>
        /// 获取缓存的内容
        /// </summary>
        /// <param name="key">所要获取内容的唯一标识</param>
        /// <returns>返回缓存的内容,如果没有,返回null值</returns>
        public object Get(string key)
        {
            return null;
        }
        /// <summary>
        /// 添加内容到缓存
        /// </summary>
        /// <param name="key">标识,要添加缓存内容的唯一标识</param>
        /// <param name="value">要添加的缓存内容</param>
        public void Save(string key, object value)
        { }
        /// <summary>
        /// 添加内容到缓存
        /// </summary>
        /// <param name="key">标识,要添加缓存内容的唯一标识</param>
        /// <param name="value">要添加的缓存内容</param>
        /// <param name="second">设定缓存的时间</param>
        public void Save(string key, object value, int second)
        { }
        /// <summary>
        /// 最大限度缓存内容
        /// </summary>
        /// <param name="key">标识,要添加缓存内容的唯一标识</param>
        /// <param name="value">要添加的缓存内容</param>
        public void Max(string key, object value)
        { }
        /// <summary>
        /// 最小限度缓存内容
        /// </summary>
        /// <param name="key">标识,要添加缓存内容的唯一标识</param>
        /// <param name="value">要添加的缓存内容</param>
        public void Min(string key, object value)
        { }
        /// <summary>
        /// 从缓存删除指定项目
        /// </summary>
        /// <param name="key">要删除缓存内容的唯一标识</param>

        public void Remove(string key)
        { }
        /// <summary>
        /// 从缓存删除指定模式的项目
        /// </summary>
        /// <param name="pattern">所包含的字符串</param>
        public void RemoveByPattern(string pattern)
        { }
        /// <summary>
        /// 清除所有缓存
        /// </summary>
        /// <exception cref="CacheException"></exception>
        public void Clear()
        { }

        #region ICache 成员


        public void Insert(string key, object obj)
        {

        }

        public void Insert(string key, object obj, System.Web.Caching.CacheDependency dep)
        {

        }

        public void Insert(string key, object obj, int seconds, System.Web.Caching.CacheItemPriority priority)
        {

        }

        public void Insert(string key, object obj, System.Web.Caching.CacheDependency dep, int seconds, System.Web.Caching.CacheItemPriority priority)
        {

        }

        public void Insert(string key, object obj, System.Web.Caching.CacheDependency dep, int seconds)
        {

        }

        public void Insert(string key, object obj, int seconds)
        {

        }

        public void Max(string key, object obj, System.Web.Caching.CacheDependency dep)
        {

        }

        public void MicroInsert(string key, object obj, int secondFactor)
        {

        }

        public void Permanent(string key, object obj, System.Web.Caching.CacheDependency dep)
        {

        }

        public void Permanent(string key, object obj)
        {

        }

        public void ReSetFactor(int cacheFactor)
        {

        }

        public int SecondFactorCalculate(int seconds)
        {
            return 0;
        }

        #endregion


        #region ICache 成员


        public string[] GetAllCache()
        {
            return null;
        }

        #endregion
    }
}
